| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Scheduler.h
1 // Scheduler.h
3 //
5
6 namespace nkTasks
7 {
11 class Scheduler final
12 {
13 public :
14
20 Scheduler (unsigned int threadCount = 0) noexcept ;
24 ~Scheduler () ;
25
26 // Getters
30 unsigned int getThreadCount () const ;
35 Thread* getThread (unsigned int index) const ;
36
37 // Tasks
43 void addTask (nkMemory::UniquePtr<SchedulerTask> task) ;
51 void resolveTask (nkMemory::UniquePtr<SchedulerTask> task) ;
55 void cancelPendingTasks () ;
56
62 void tick () ;
63
64 // Threads
71 void flush () ;
77 void resizeForThreadCount (unsigned int threadCount) ;
78 } ;
79 }
nkTasks::Thread
Symbolizes a thread. Base block to submit off-thread nkTasks::Task in this component.
Definition: Thread.h:12
nkTasks::Scheduler::getThread
Thread * getThread(unsigned int index) const
nkTasks::Scheduler::resolveTask
void resolveTask(nkMemory::UniquePtr< SchedulerTask > task)
nkTasks::Scheduler::getThreadCount
unsigned int getThreadCount() const
nkTasks
Encompasses all API of component NilkinsTasks.
Definition: LogManager.h:7
nkTasks::Scheduler::resizeForThreadCount
void resizeForThreadCount(unsigned int threadCount)
nkTasks::Scheduler::addTask
void addTask(nkMemory::UniquePtr< SchedulerTask > task)
nkTasks::Scheduler::Scheduler
Scheduler(unsigned int threadCount=0) noexcept
nkTasks::Scheduler::flush
void flush()
nkTasks::SchedulerTask
A task compatible with the Scheduler, adding a synchronization point.
Definition: SchedulerTask.h:12
nkTasks::Scheduler::tick
void tick()
nkTasks::Scheduler::cancelPendingTasks
void cancelPendingTasks()
nkTasks::Scheduler
Manages a ThreadPool and eases the synchronization with the managing thread.
Definition: Scheduler.h:12
nkMemory
Encompasses all API of component NilkinsMemory.
Definition: Allocator.h:7